package com.ntschy.sys.entity.dataobject;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ntschy.common.core.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 系统访问记录表 sys_logininfor
 *
 * @author ezreal_geng
 */
@Data
@NoArgsConstructor  //无参构造函数
@TableName("SYS_LOGININFOR")
@ApiModel(description = "登陆日志")
public class SysLogininfor extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "登陆日志ID")
    @TableId
    private String infoId;

    @ApiModelProperty(value = "用户账号")
    @TableField(value = "UserName")
    private String userName;

    @ApiModelProperty(value = "登录状态 0成功 1失败")
    @TableField(value = "Status")
    private String status;


    @ApiModelProperty(value = "浏览器")
    @TableField(value = "Browser")
    private String browser;

    @ApiModelProperty(value = "操作系统")
    @TableField(value = "Os")
    private String os;

    @ApiModelProperty(value = "提示消息")
    @TableField(value = "Msg")
    private String msg;

    @ApiModelProperty(value = "访问时间")
    @TableField(value = "LoginTime")
    private String loginTime;


    @Builder
    public SysLogininfor(String infoId, String userName, String status, String browser, String os, String msg, String loginTime) {
        this.infoId = infoId;
        this.userName = userName;
        this.status = status;
        this.browser = browser;
        this.os = os;
        this.msg = msg;
        this.loginTime = loginTime;
    }
}
